package com.shanzmoo.db.picture.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.shanzmoo.db.picture.entity.ProductPictureEntity;
import com.shanzmoo.db.picture.mapper.ProductPictureMapper;
import com.shanzmoo.db.picture.service.IProductPictureService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 商品图片 服务实现类
 * </p>
 *
 * @author Xueqz
 * @since 2020-12-20
 */
@Service
public class ProductPictureServiceImpl extends ServiceImpl<ProductPictureMapper, ProductPictureEntity> implements IProductPictureService {

    @Override
    public List<ProductPictureEntity> getPicturesBySpuId(Integer spuId) {
        return baseMapper.selectList(new QueryWrapper<ProductPictureEntity>().eq("deleted",false).eq("product_id",spuId));
    }
}
